Next | Prev | Up | Top | Contents | Index

I/O Scheduling

process:blocked by I/OWhen a process initiates I/O, IRIX usually suspends the process until data transfer is complete. By understanding the I/O system, and by using the Asynchronous I/O feature, you can make sure that a real-time process is not blocked in this way.


Disk I/O

When a process requests disk input, it is blocked until the data has been read and copied into the designated buffer. When a process requests disk output, it is blocked until the data has been copied into a kernel buffer or until the disk write is complete, depending on the options used when the file was opened.


VME Bus I/O

VME bus:and process schedulingYour program can perform I/O to the VME bus in three ways: programmed I/O (PIO), direct memory access (DMA) from VME Bus Master devices, and a unique form of DMA from VME Bus Slave devices.

When it uses programmed I/O, your program polls the device registers or memory as if they were variables in memory, and does not block. Your real-time program can do PIO in a time-critical process.

VME-bus I/O using either form of DMA generally does delay the requesting process until the DMA transfer is complete. All of these methods are discussed under "Program Access to the VME Bus".


Other I/O

file descriptor:returned by <Function>open() device:opening <Function>open()In general, UNIX allows your process to open any device for I/O with the open() call. You specify a pathname designating one of the device special files found in the /dev directory. The open() call returns a file descriptor which you can pass to the read() or write() functions. For device files, these functions are routed directly to the device driver for the device. Through this means your program can read or write serial devices, SCSI devices, and (in SGI systems other than Challenge/Onyx), devices on the GIO or EISA bus.

A call to a device driver for input or output normally blocks the calling process until the data has been transferred.


Asynchronous I/O

asynchronous I/OTypically, a real-time process cannot allow itself to be blocked for I/O. Asynchronous I/O is a feature of IRIX that gives you the ability to schedule I/O to be done in a separate process. This process--created automatically for you--requests the I/O and waits for it, while your real-time process continues to execute. For details on asynchronous I/O, see Chapter 8, "Optimizing Disk I/O for a Real-Time Program."process<$endrange>

IRIX overview<$endrange>


Next | Prev | Up | Top | Contents | Index